Skip to content

Conversation

@huynguyengl99
Copy link
Contributor

No description provided.

@github-actions

This comment has been minimized.

@huynguyengl99 huynguyengl99 force-pushed the feat/django-polymorphic branch from 37ef686 to 2168e07 Compare January 17, 2026 17:12
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick note: We need explanations for the possible types for Any, except for obvious cases (like dict[str, Any] or Model[Any]). But especially annotations like object: Any or **kwargs: Any need an explanation on why Any was used or what types are allowed. You can also leave these fields unannotated or use Incomplete where that is not possible for now.

@huynguyengl99
Copy link
Contributor Author

Hi @srittau , thank you for your review. Initially, I planned to create this PR to help add type hints to the upstream package. However, after discussing this with the current project lead maintainer in jazzband/django-polymorphic#647, he prefers to add the types directly in the project, as this will be much more helpful in the long term.

Because of that, I created this PR mainly to establish the initial types and to run our full type-checking workflow, ensuring the types are correct before submitting a PR back to that repository. That’s also the reason I haven’t linked an upstream issue to this PR yet. As a result, some Any types are still left in place without detailed comments for now 😅

@srittau
Copy link
Collaborator

srittau commented Jan 20, 2026

In that case, it's best to just remove Any and leave the items unannotated (or use Incomplete) for now. This can always be improved in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants